package demo;
public class Son extends Father {
    public String hobby;
    public Son(int number, int age, String name,String hobby) {
        super(number, age, name);
        this.hobby=hobby;
        System.out.println("构造方法执行了");
    }
    {
        this.age=11;
        this.name="ZhangSan";
        System.out.println("子类实例代码块执行");
    }
    static{
        System.out.println("子类静态代码块执行");
    }
    public void eat(){
        System.out.println("吃东西");
    }
}
